FROM java:8

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8

COPY ./target/classes/simsun.ttc  /usr/share/fonts/truetype/simsun.ttc
RUN fc-cache -f -v /usr/share/fonts/truetype/simsun.ttc

ADD target/shuzhi-admin.jar target.jar

EXPOSE 8080

EXPOSE 8081

ENTRYPOINT ["java","-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8081","-Djava.security.egd=file:/dev/./urandom", "-jar", "/target.jar","--spring.profiles.active=dev","-Duser.timezone=GMT+08"]
#ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom", "-jar","-Xmx128m", "-Xms64m", "-Xmn32m", "-Xss16m", "/target.jar","--spring.profiles.active=dev","-Duser.timezone=GMT+08"]